/**
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@use "sass:color";
@use "../../common";

@use "@angular/material" as mat;

$SIDEBAR_BACKGROUND: mat.m2-get-color-from-palette(mat.$m2-indigo-palette, 100);
$BUTTON_BACKGROUND_ACTIVE: mat.m2-get-color-from-palette(
  mat.$m2-indigo-palette,
  600
);
$BUTTON_BACKGROUND_INACTIVE: mat.m2-get-color-from-palette(
  mat.$m2-indigo-palette,
  200
);
$BUTTON_COLOR_ACTIVE: white;
$BUTTON_COLOR_INACTIVE: black;

.wrapper {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  overflow: hidden;
}

.main-view-wrapper {
  display: flex;
}

.timeline {
  flex: 1;
}

.sidebar {
  grid-area: sidebar;
  display: flex;
  row-gap: 1px;
  flex-direction: column;
  justify-content: flex-end;
  background-color: $SIDEBAR_BACKGROUND;
  box-shadow: (-1px) 0 5px 0 rgba(0, 0, 0, 0.35);
}

.pane-toggle {
  appearance: none;
  border: none;
  padding: none;
  background-color: $BUTTON_BACKGROUND_INACTIVE;
  color: $BUTTON_COLOR_INACTIVE;

  &:hover {
    background-color: color.adjust(
      $BUTTON_BACKGROUND_INACTIVE,
      $lightness: -10%
    );
  }

  &.active {
    background-color: $BUTTON_BACKGROUND_ACTIVE;
    color: $BUTTON_COLOR_ACTIVE;

    &:hover {
      background-color: color.adjust(
        $BUTTON_BACKGROUND_ACTIVE,
        $lightness: 10%
      );
    }
  }
}
